# syntax=docker/dockerfile:1
FROM python:3.11 AS build

COPY requirements.txt /opt/dependencies/requirements.txt
RUN pip install -r /opt/dependencies/requirements.txt

# RUN python -m spacy download ru_core_news_sm

# make sure that libs are located at the desired path
RUN ls /usr/local/lib/python3.11/site-packages

# copy built libs and serve
FROM python:3.11
COPY --from=build /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/

WORKDIR /opt/backend
# RUN chmod +x ./run.sh
EXPOSE 5239
CMD ["./run.sh"]
